<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
    <title>{$sysinfo['title']}</title>
    <link rel="stylesheet" href="/static/css/weui.css" />
    <link rel="stylesheet" href="/static/css/kouhong.css"/>

    <link rel="stylesheet" href="/static/css/login.css?i=1" />
</head>
<style>


</style>
<body>
<div class='indexbg' data-uid="{$user['uniacid']}" id="page">
    <a class="cardWrap" id="statu" onclick="bindtz();" href="javascript:;">
        <button class="Refresh" >跳过</button>
    </a>
</div>
<!-- loading toast -->
<div id="loadingToast" style="display:none;">
    <div class="weui-mask_transparent"></div>
    <div class="weui-toast">
        <i class="weui-loading weui-icon_toast"></i>
        <p class="weui-toast__content">数据加载中</p>
    </div>
</div>
</body>
<div id="dialogs">
<div class="js_dialog" id="showModal1" style="display: none;">
    <div class="weui-mask"></div>
    <div class="weui-dialog modal-dialog">
        <div class="weui-dialog_hd kh_none" id="mtitle"></div>
        <div class="weui-dialog_bd">
            <div class="modal-body">
                <img src="/static/img/kh_ku.png"/>
                <div class="kh_none">您当月充值已满额， 请下月再试</div>
            </div>
        </div>

        <div class="weui-dialog_ft">

        </div>

    </div>
</div>
</div>
<script src="/static/js/jquery-3.2.1.js"></script>
<script src="https://res.wx.qq.com/open/js/jweixin-1.4.0.js"></script>
<script>
    $(function(){



        $('#dialogs').on('click', '.js_dialog', function(){
            $(this).fadeOut(200);
            $("#page").removeClass("pages");
        });

        });
</script>
<script>
    $(function() {
        $.ajax({
            url: "{:url('member/index')}",
            data: {},
            dataType: "json",
            type: "post",
            success: function (res) {
                console.log(66, res);
                if (res.code == 0) {
                    $("#statu").attr("data-statu", res.data.statu);

                }
            }
        });
    })
</script>
<script>

    function bindtz(){
        var $showModal1 = $('#showModal1')
     var statu=$("#statu").attr("data-statu");
     if(statu==1){
         $("#page").addClass("pages");
         $showModal1.fadeIn(200);
     }else{
         setTimeout(function(){
            window.location.href="{:url('index/index',array('platid'=>$user['uniacid']))}";
         },500)
     }
    }
</script>
<script>

    $(function(){
        var uid=$(".indexbg").attr("data-uid");
        $.ajax({
            url: "{:url('')}",
            data: {
                uniacid:uid
            },
            dataType: "json",
            type: "post",
            success: function (res) {
             console.log(11,res);
             if(res.code==0){
               $(".cardWrap").attr("style","background:url("+res.data.loading_url +")  no-repeat;    background-size: 100% 100%;\n" +
                   "    background-attachment: fixed;");
             }
            }
        })
    })
    $(function(){
        var $loadingToast = $('#loadingToast');
        $('#showLoadingToast').on('click', function(){
            if ($loadingToast.css('display') != 'none') return;

            $loadingToast.fadeIn(100);
            setTimeout(function () {
                $loadingToast.fadeOut(100);
            }, 2000);
        });
    });
</script>
<script type="text/javascript">
// function bindtz(){
//     console.log(23);
//     setTimeout(function(){
//         window.location.href="{:url('index/index',array('platid'=>$user['uniacid']))}";
//     },500)
// }
</script>
<script>
    wx.config({$jssdkconfig});
    wx.ready(function () {
        wx.onMenuShareAppMessage({
            title: "{$jssdksharedata['title']}", // 分享标题
            desc: "{$jssdksharedata['desc']}", // 分享描述
            link: "{$jssdksharedata['link']}", // 分享链接，该链接域名或路径必须与当前页面对应的公众号JS安全域名一致
            success: function () {
                $.ajax({
                    url: "{:url('member/sharebalace')}",
                    data: {
                    },
                    dataType: "json",
                    type: "post",
                    success: function (res) {
                        console.log(11,res);
                        if(res.code==0){

                        }
                    }
                })
            }
        });
        wx.onMenuShareTimeline({
            title: '', // 分享标题
            link: '', // 分享链接，该链接域名或路径必须与当前页面对应的公众号JS安全域名一致
            imgUrl: '', // 分享图标
            success: function () {
                // 用户点击了分享后执行的回调函数
                $.ajax({
                    url: "{:url('member/sharebalace')}",
                    data: {
                    },
                    dataType: "json",
                    type: "post",
                    success: function (res) {
                        console.log(11,res);
                        if(res.code==0){

                        }
                    }
                })
            },
        })

    })
</script>
</html>
